<template>
  <div class="supplier-info-wrap">
    <el-form
      :class="{'mobile-el-form mobile-fly-detail': showMobilePage}"
      :label-position="showMobilePage?'left':'right'"
      label-width="110px"
      class="supplier-form height55">
      <el-row :gutter="20" :class="{'dividing': !showMobilePage}">
        <el-col :span="12">
          <el-form-item label="创建人：" prop="creator" style="margin-bottom: 0px;">
            <ToolTip :content="baseInfo.creator" placement="top-start"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="所属部门：" prop="departmentName" style="margin-bottom: 0px;">
            <ToolTip :content="baseInfo.departmentName" placement="top-start"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="询单编号：" prop="sn" style="margin-bottom: 0px;">
            <ToolTip :content="baseInfo.sn" placement="top-start"/>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="发布时间：" prop="createTime" style="margin-bottom: 0px;">
            <ToolTip :content="format(baseInfo.createDate,'YYYY/MM/DD HH:mm')" placement="top-start"/>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import { format } from '@/filters/date';
import { mapState } from 'vuex';

export default {
  props: {
    baseInfo: {// 详情信息
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      format
    };
  },
  computed: {
    ...mapState({
      'showMobilePage': state => state.app.showMobilePage
    })
  },
  methods: {}
};
</script>
<style lang="scss" scoped>
  .supplier-info-wrap{
    .mobile-fly-detail {
      padding-left: 10px;
    }
    .supplier-form {
      & ::v-deep {
        .el-form-item {
            .el-form-item__label {
              font-size: 14px;
              font-family: PingFang SC;
              font-weight: 400;
              color: #999999 !important;
              opacity: 1;
              line-height: 30px;
            }
          }
          .el-form-item__content {
            font-size: 14px;
            font-family: PingFang SC;
            line-height: 30px;
            font-weight: 400;
            color: #333333;
            opacity: 1;
          }
      }
    }
    .link{
      color: #406EFF;
      cursor: pointer;
    }
    .dividing{
      &::v-deep {
        .el-col {
          .el-form-item__content {
            border-right: 1px solid #EBEEFD;
          }
          &:nth-child(2n) {
            .el-form-item__content {
              border-right: none;
            }
          }
          &:last-child {
            .el-form-item__content {
              border-right: none;
            }
          }
        }
      }
    }
  }
</style>
